<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<!DOCTYPE html>
<html>
<head>
    <title>公告日志管理</title>
    <%@ include file="/WEB-INF/component/commonCSS.jsp" %>  
    <!--[if lt IE 9]>
        <script src="${ctx}/lib/js/html5shiv.min.js"></script>
        <script src="${ctx}/lib/js/respond.min.js"></script>
    <![endif]-->
</head>
<body class="skin-blue-light sidebar-mini fixed skin-blue-light-frame">
							
    <section class="content-header">
        <h1>公告维护记录查看</h1>
        <ol class="breadcrumb">
            <li><a href="${ctx}/home.jsp"><i class="fa fa-home"></i>首页</a></li>
            <li class="active"><a href="#">药品招标管理</a></li>
            <li class="active"><a href="#">招标公告管理</a></li>
        </ol>
    </section>
    
    <section class="content">
        <div class=" box box-success">
            <div class="box-body">
                <div class="form-inline">
                    <div class="form-group form-group-xs">
                        <label for="sysNoticeDateTime">发布日期：</label>
                        <input class="form-control" type="text" name="startPoint" id="startPoint" placeholder="开始时间" data-provide="datepicker" data-date-fmt="yyyy-MM-dd"/>
                        <label>-</label>
                        <input class="form-control" type="text" name="endPoint" id="endPoint" placeholder="结束时间" data-provide="datepicker" data-date-fmt="yyyy-MM-dd" />
                    </div>
                    <button type="button" class="btn btn-success btn-sm" onclick="search();">查&nbsp;询</button>
                </div>
            </div>
        </div>
        
        <table class="jqgrid" id="gridlist"></table>
        <div id="gridpage"></div>
        
        <div class=" box box-warning bottongroup">
             <a href="toSysNoticeList.html?projId=${projId }" class="btn btn-default btn-sm">返&nbsp;回</a>
        </div>
  
    </section>
     <%@ include file="/WEB-INF/component/commonJS.jsp" %>  
    <script type="text/javascript"> 
    	function back(){
    		window.location.href="toSysNoticeList.html";
    	}
    	function search(page) {
    		var startPoint = $.trim($("#startPoint").val());
    		var endPoint = $.trim($("#endPoint").val());
    		startPoint = startPoint + " 00:00:00"
    		endPoint = endPoint + " 23:59:59"
    		$("#gridlist").jqGrid('setGridParam',{  
    	        datatype:'json',
    	        postData:{"startPoint":startPoint, "endPoint":endPoint},
    	        page : (page || 1)
    	    }).trigger("reloadGrid"); //重新载入  
    	}
    
        $(function () {
            $("#gridlist").jqGrid({
                url: "getSysNoticeLogList.html?sysNoticeId=${sysNoticeId}",
                mtype: "post",
                datatype: "json",
                autowidth: true,
                height: 270,
                colNames: [
                    '操作',
                    '公告id',
                    '公告code',
                    '标题',
                    '发布机构',
                    '内容',
                    '阅读次数',
					'发布时间', 
					'url',
					'更新时间',
					'更新人',
					'状态'
					
                ],
                colModel: [
                    { name: 'operate', width: 60, align:"center", sortable: false,
                           	formatter : function(val, opts, rowdata) {
       	                    	var str ="<a href='toSysNoticeLogDetail.html?sysNoticeId="+rowdata.sysNoticeId+"&updDateTime="+rowdata.updDateTime+"'>详情</a>";
       	                    	return str;
                     }},
                    { name: 'sysNoticeId',hidden:true, width: 100, align:"center", sortable: false},
                    { name: 'sysNoticeCode',hidden:true, width: 120, align:"center", sortable: false },
                    { name: 'title', width: 180, align:"left", sortable: false},
                    { name: 'org',width: 160, align:"center", sortable: false},
                    { name: 'content',hidden:true, width: 110, align:"center", sortable: false},
                    { name: 'readCount',hidden:true, width: 60, align:"center", sortable: false},
                    { name: 'dateTime', width: 160, align:"center", sortable: false},
                    { name: 'url',hidden:true, width: 110, align:"center", sortable: false},
                    { name: 'updDateTime', width: 160, align:"center", sortable: false},
                    { name: 'updUser', width: 110, align:"center", sortable: false},
                    { name: 'status', width: 40, align: 'center', sortable: false,
                    	formatter : function(val, opts, rowdata) {
                    		var strSta = "";
                    		if(rowdata.status == 1){
                    			strSta += "已发布";
                    		}else{
                    			strSta += "未发布";
                    		}
                    		return strSta;
                    	}
                    }
                   
                ],
                rowNum: 20,
                rowList: [10, 20, 50, 100],
                rownumbers: true,
                pager: "#gridpage",
                multiselect: true, 
                viewrecords: true,
                caption: "公告日志列表",
                jsonReader: {
                    id: "hospId"
                }
            });
            
            $("#gridlist").jqGrid('navGrid', '#gridpage', { add: false, edit: false, del: false, search: false, refresh: false });
            
            $("#area2").HNSelect({
                url: "${ctx}/selectController/getArea.html", 
                data: { ID: '330000' },
                defaultText: "<option value=''>请选择</option>",
                defaultselect: "",
                func: function () {
                    $("#area3").HNSelect({
                        parent_selector: "#area2", 
                        url: "${ctx}/selectController/getArea.html", 
                        dataid: "ID", 
                        defaultText: "<option value=''>请选择</option>",
                        defaultselect: ""
                    });
                }
            });
            $("#hospClassify").HNSelect({
                url: "${ctx}/selectController/getArchiveType.html", 
                data: { classifyCode: "113" },
                defaultText: "<option value=''>请选择</option>",
                defaultselect: "",
            });
            $(window).trigger("resize");
        });
    </script>
</body>
</html>












